package SuanFa;

/**
 * Created by asd73 on 2017/8/26.
 */
public class Test2 {
    public static void main(String[] args) {
        int k,leap =1;
        int count =0;
        for (int i=101;i<=200;i+=2){
            boolean b = false;
            for (int j =2;j<Math.sqrt(i);j++){
                if (i%j == 0){
                    b=false;
                    break;
                }else {
                    b=true;
                }

            }
            if (b){
                count++;
                System.out.println(i);
            }
        }
        System.out.println("total num is:"+count);
    }
}
class test2_1{
    public static void main(String[] args) {
        int[] num = new int[23];
        num[0]=num[1]=1;
        for (int i=0;i<num.length;i++){
            if (i<=1){
                System.out.println("The num of rabbit num is:"+num[0]);
            }else {
                num[i]=num[i-1]+num[i-2];
                System.out.println("num is:"+num[i]);
            }
        }
    }
}

class test2_2{
    public static void main(String[] args) {
        int count =0;
        for (int i=101;i<200;i+=2){
            boolean b =false;
            for (int j=2;j<Math.sqrt(i);j++){
                if (i%j==0){
                    b=false;
                    break;
                }else {
                    b=true;
                }
            }
            if (b){
                count++;
                System.out.println(i);
            }
        }
        System.out.println(count);
    }
}